package cn.jiyun.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author Fay
 * @date 2022/6/22&10:42
 */
@Component
@Slf4j
public class ScheduledDemo {
    @Scheduled(cron = "0/2 * * * * ?")
    public void scheduled(){
        log.debug("定时任务执行了");
    }
}
